#include "EditorMeshMaterialPropertyModel.h"

#include "Mesh/StaticMesh.h"

#include "Object/NewObject.h"
#include "Pages/Mesh/EditorMeshPageModel.h"

TSharedObjectPtr<REditorMeshMaterialPropertyModel> REditorMeshMaterialPropertyModel::Create(TSharedObjectPtr<REditorMeshPageModel> InMeshPageModel, RObject * InParent)
{
    auto Model = NewObject<REditorMeshMaterialPropertyModel>(InParent);
    Model->MeshPageModel = InMeshPageModel;
    return Model;
}

TSharedObjectPtr<RStaticMesh> REditorMeshMaterialPropertyModel::GetMesh() const
{
    return MeshPageModel->GetMesh();
}

void REditorMeshMaterialPropertyModel::SetMaterial(int64_t MaterialSlotIndex, TSharedObjectPtr<RMaterial> InMaterial)
{
    MeshPageModel->SetMaterial(MaterialSlotIndex, InMaterial);
}
